package xyz.xiaomuyu.moment_read_app.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import xyz.xiaomuyu.moment_read_app.R;
import xyz.xiaomuyu.moment_read_app.bean.woshishabi;

public class CollectionForMusic extends Activity {

    private View view;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_collection_for_music);
        view = findViewById(R.id.collection_music);
        if(woshishabi.collection_music == 1){

            view.setVisibility(View.VISIBLE);
            view.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Intent intent = new Intent(CollectionForMusic.this,Music.class);
                    startActivity(intent);
                }
            });
        }else {
            view.setVisibility(View.INVISIBLE);
        }
    }
}